-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructions to compile test2json
without local go
#226
Instructions to compile test2json
without local go
#226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR!
Can you help me better understand the use case that is better served by this change to the docs?
I believe even in the updated version of the docs the cmd/test2json
path refers to a Go source checkout. Since a Go source checkout is needed in both cases, it seems like it might be easier for most use cases to simply compile all the binaries from the source checkout.
Technically the change is correct. You could use a different version of Go to build test2json
, but I don't understand in what cases that would be preferable. I guess it might be faster to download than to build all the binaries?
These instructions are mostly intended to be guidelines, to help someone understand the dependencies needed to run gotestsum
. I don't expect them to capture every use case. Maybe we could document this as an alternative approach?
682d507
to
8755c22
Compare
@dnephin of course! You are right, the source code is needed in both cases. However, with the current docs, we need a I think I didn't explain correctly my goal. I didn't intend for the docs to show how to compile If you prefer to not include this in the docs because it's a edge case or because that wasn't the intent of this doc, that's cool with me. I just thought that the idea was to show how to use As for my usecase, I was trying to build an image for running tests in CI but I didn't want to install By the way, I just updated the PR with a couple env vars I missed that are necessary for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! That's a good point about the old version. I missed that those instructions also required an existing Go binary.
If I remember correctly, the purpose of these docs was to show how to build test2json
so that it can be copied to another machine for CI.
I think the edits you made are generally a good improvement, but I think saying "without a Go install" is a bit misleading. I would categorize the curl
step that downloads Go as installing it. Once Go is downloaded there's no reason to build test2json
for the local machine, since you could run go tool test2json
. Building the binary is more for distributing to other places without having to distribute the whole Go toolchain.
I've suggested a few small edits, but otherwise looks great!
8074592
to
d0b0f09
Compare
…installation Co-authored-by: Daniel Nephin <dnephin@gmail.com>
d0b0f09
to
42e50c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
@dnephin done, PTAL 🙂 |
With the current instructions you actually need a local go installation. Even if the go source is downloaded, a go binary is needed to compile test2json, even if it's a different version than the
test2json
one.This PR adds instructions to download a temporary go binary, compile test2json from it and delete it.